package com.steel.yfmall.cloud.assistant.controller;

import com.alibaba.fastjson.JSON;
import com.steel.yfmall.cloud.assistant.dto.para.user.ParaSteelUserCompanyRegionRel;
import com.steel.yfmall.cloud.assistant.user.UserCompanyRegionRelService;
import com.steel.yfmall.cloud.components.utils.base.APIMsgBean;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @program: CqCompanyRegionStatusController
 * @author: liuzhijun
 * @date: 2021-05-10 16:38
 **/
@RestController
@Slf4j
public class CqCompanyRegionStatusController {

    /**
     * 苍穹同步公司终到地点终到地区信息 (全量推送,未推送数据需要删除)
     *
     * @param paraBeanList
     * @return com.steel.yfmall.cloud.components.utils.base.APIMsgBean<java.lang.Boolean>
     * @author liuzhijun
     * @date 2021/5/10 17:01
     */
    @RequestMapping("companyRegionSyncStatus")
    public APIMsgBean<Boolean> companyRegionSyncStatus(@RequestBody ParaSteelUserCompanyRegionRel paraBeanList) {
        if (log.isDebugEnabled()) {
            log.info("function uploadImage :" + JSON.toJSONString(paraBeanList));
        }
        return userCompanyRegionRelService.companyRegionSyncStatus(paraBeanList);
    }

    @Resource
    private UserCompanyRegionRelService userCompanyRegionRelService;
}
